import request from "@/utils/request";

/**
 * 查询组织架构
 */
export const getOrgTree = params => {
  return request({
    url: "/process/org/tree",
    method: "get",
    params
  });
};

/**
 * 查询系统角色
 * @returns {*}
 */
export const getRole = () => {
  return request({
    url: "/process/org/user/sign",
    method: "get"
  });
};

/**
 * 搜索人员
 * @param { object } params
 * @param { string } params.userName -用户名
 */
export const getUserByName = params => {
  return request({
    url: "/process/org/tree/user/search",
    method: "get",
    params
  });
};

export default {
  getOrgTree,
  getUserByName,
  getRole
};
